package com.changcheng.project.yuminsi.error;


/**
 * @author yuminsi
 * @description
 * @date 2020/8/24 10:24
 * @since
 */
public class BusinessException extends RuntimeException {
    private static final long serialVersionUID = 1L;

    private String code;
    private String description;


    public BusinessException() {
    }


    public BusinessException(String code, String description) {
        this.code = code;
        this.description = description;
    }

    public BusinessException(GlobalErrorCode globalErrorCode) {
        this(globalErrorCode.getCode(), globalErrorCode.getDescription());
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

}
